<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">

    <!--                                                               -->
    <!-- Consider inlining CSS to reduce the number of requested files -->
    <!--                                                               -->
    <link type="text/css" rel="stylesheet" href="pageapi.css">
    <link type="text/css" rel="stylesheet" href="css/table.css">
    <link type="text/css" rel="stylesheet" href="qqmail.css">
    <link type="text/css" rel="stylesheet" href="css/items.css">
    
    <!--                                           -->
    <!-- Any title is fine                         -->
    <!--                                           -->
    <title>淘宝页面流程化项目测试环境</title>
  </head>
<body>

<script type='text/javascript'>

var queryString = window.location.search.substring("?".length);

var errorInfoMap = new Array();
var userActionMap = new Array();

// Initialize
errorInfoMap["1"] = "系统错误";
errorInfoMap["0"] = "成功";

// Shutdown the trade
errorInfoMap["12000"] = "操作成功";
errorInfoMap["12001"] = "系统错误";
errorInfoMap["12002"] = "用户点击了关闭按钮";
errorInfoMap["12003"] = "不能关闭交易";

errorInfoMap["12004"] = "没有权限";
errorInfoMap["12005"] = "用户没有选择关闭交易理由";

// Delay 
errorInfoMap["13000"] = "操作成功";
errorInfoMap["13001"] = "系统错误";
errorInfoMap["13002"] = "用户点击了关闭按钮";


// Modify price
errorInfoMap["11000"] = "操作成功";
errorInfoMap["11001"] = "系统错误";
errorInfoMap["11002"] = "用户点击了关闭按钮";
errorInfoMap["11003"] = "没有权限";

errorInfoMap["11004"] = "用户没有选择关闭交易理由";
errorInfoMap["11005"] = "关闭所有交易失败";
errorInfoMap["11006"] = "关闭所有交易成功";
errorInfoMap["11007"] = "单笔订单修改价格后需要大于0";

errorInfoMap["11008"] = "总价不含邮费需要大于0";

// Refund
errorInfoMap["14002"] = "查询退款信息失败";
errorInfoMap["14003"] = "查询物流信息失败";
errorInfoMap["14004"] = "卖家同意退款协议失败";
errorInfoMap["14005"] = "卖家拒绝退款协议失败";

errorInfoMap["14006"] = "卖家确认退款失败";
errorInfoMap["14007"] = "卖家拒绝退款失败";
errorInfoMap["14008"] = "卖家必须上传发货凭证";
errorInfoMap["14009"] = "买家又修改了退款协议";

errorInfoMap["14010"] = "退款已经关闭";
errorInfoMap["14011"] = "创建留言失败";
errorInfoMap["14014"] = "零元退款金额校验失败";
errorInfoMap["14015"] = "对不起，您已经发起了退款";

errorInfoMap["14016"] = "收货地址不能为空";
errorInfoMap["14017"] = "由于红包金额不支持部分退款，您不能进行本次操作";
errorInfoMap["14018"] = "对不起，您要求的退款金额不合法";
errorInfoMap["14019"] = "对不起，操作失败，本笔退款会导致红包拆分";

errorInfoMap["14020"] = "参数错误";
errorInfoMap["14021"] = "无法要求小二介入";

errorInfoMap["14101"] = "您不是交易买家";
errorInfoMap["14102"] = "您不是交易卖家";
errorInfoMap["14103"] = "目前您不能退款发货";
errorInfoMap["14104"] = "目前您不能发起退款";

errorInfoMap["14105"] = "目前您不能修改退款协议";
errorInfoMap["14106"] = "你不是交易双方";
errorInfoMap["14108"] = "客服初审完成，不能修改退款协议";
errorInfoMap["14109"] = "目前您不能同意或拒绝退款协议";

errorInfoMap["14110"] = "目前您不能同意或拒绝打款给买家";
errorInfoMap["14111"] = "退款已经结束，您不能再提交留言凭证";
errorInfoMap["14112"] = "你要求的退款金额不合法";
errorInfoMap["14115"] = "物流公司为空";

errorInfoMap["14116"] = "非法物流方式";
errorInfoMap["14117"] = "没有退款记录";

errorInfoMap["16001"] = "获取订单失败";
errorInfoMap["16002"] = "只有商品的买家才能确认收货";
errorInfoMap["16003"] = "已经确认收货，无须再次确认";
errorInfoMap["16004"] = "订单存在退款(主订单退款或一部分子订单有退款)";
errorInfoMap["16005"] = "未退款的子订单可以确认收货，前提是其父订单必须为正在退款的状态";

 userActionMap["0"] = "创建退款协议";
 userActionMap["1"] = "买家修改协议";
 userActionMap["2"] = "买家退款发货";
 userActionMap["3"] = "卖家同意退款协议";
 userActionMap["4"] = "卖家拒绝退款协议";
 userActionMap["5"] = "卖家确认到货";
 userActionMap["6"] = "卖家否认到货";
 userActionMap["11"] = "要求小二介入";

var pairs = queryString.split("&");//在逗号处断开

//var args = array();

document.write("返回参数：<br>");
for(var i=0;i<pairs.length;i++)  
{
	
    var pos=pairs[i].indexOf('=');//查找name=value  
    
    if(pos==-1)  continue;//如果没有找到就跳过
      
    var argname=pairs[i].substring(0,pos);//提取name
      
    var value=pairs[i].substring(pos+1);//提取value
      
//    args[argname]=unescape(value);//存为属性
	if (argname == "result_code")
		document.write(argname + " = " + errorInfoMap[value] + "<br>");
	else if (argname == "userAction")
		document.write(argname + " = " + userActionMap[value] + "<br>");
	else
		document.write(argname + " = " + value + "<br>");        
}

</script>


</body>
</html>